Skip to content

pppd: Be careful not to access beyond end of EAP packets#582

Merged
paulusmack merged 1 commit into
masterfrom
eapfix
Apr 15, 2026
Merged

pppd: Be careful not to access beyond end of EAP packets#582
paulusmack merged 1 commit into
masterfrom
eapfix

Conversation

@paulusmack
Copy link
Copy Markdown
Collaborator

In the EAP code there are a few places where we could read beyond the end of the received data in a malformed packet received from the peer. Because the received packet is in the statically-allocated inpacket_buf, and because EAP packets can only have a limited number of fields of limited size, these accesses would be within the bounds of inpacket_buf, not to unallocated data. Furthermore the data read were not disclosed to the peer and didn't affect the operation of pppd beyond being printed in log messages. Hence the security impact of these accesses is low, and in fact they don't appear to create any actual vulnerability. Nevertheless it is better to be careful, so this adds extra checks to make sure we never read beyond the end of the received data.

Thanks to Kazuma Matsumoto, a security researcher at GMO Cybersecurity by IERAE, Inc., for finding this.

In the EAP code there are a few places where we could read beyond
the end of the received data in a malformed packet received from the
peer.  Because the received packet is in the statically-allocated
inpacket_buf, and because EAP packets can only have a limited number
of fields of limited size, these accesses would be within the bounds
of inpacket_buf, not to unallocated data.  Furthermore the data
read were not disclosed to the peer and didn't affect the operation
of pppd beyond being printed in log messages.  Hence the security
impact of these accesses is low, and in fact they don't appear to
create any actual vulnerability.  Nevertheless it is better to be
careful, so this adds extra checks to make sure we never read beyond
the end of the received data.

Thanks to Kazuma Matsumoto, a security researcher at GMO Cybersecurity
by IERAE, Inc., for finding this.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
@paulusmack paulusmack merged commit 1371451 into master Apr 15, 2026
61 checks passed
@paulusmack paulusmack deleted the eapfix branch April 21, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant